package co.baiku.boot.im.tencent.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * 消息元素 TIMMsgElement
 * <p>
 * 语音消息元素<br/>
 * 不能通过服务端集成的 Rest API 接口发送语音消息，发送语音消息需要通过客户端集成相应的接口。
 * </p>
 */
@JsonTypeName(value = "TIMSoundElem")
public class TencentMsgSoundElem implements TencentMsgContent {
    /**
     * 语音序列号。后台用于索引语音的键值。
     */
    @JsonProperty("UUID")
    private String uuid;
    /**
     * 语音数据大小，单位：字节。
     */
    @JsonProperty("Size")
    private Long size;
    /**
     * 语音时长，单位：秒。
     */
    @JsonProperty("Second")
    private Integer second;


    public TencentMsgSoundElem() {
    }

    public TencentMsgSoundElem(String uuid, Long size, Integer second) {
        this.uuid = uuid;
        this.size = size;
        this.second = second;
    }

    public static TencentMsgSoundElem of(String uuid, Long size, Integer second) {
        return new TencentMsgSoundElem(uuid, size, second);
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public Integer getSecond() {
        return second;
    }

    public void setSecond(Integer second) {
        this.second = second;
    }
}
